/*
 * Copyright 2014 Semidata. All rights reserved.
 */
package com.semidata.rtd.engine.main;

import java.util.Random;

import com.semidata.rtd.engine.job.Job;
import com.semidata.rtd.engine.job.SyncTask;

/**
 * @author shewei@semidata.com, She Wei
 * 
 */
public class TestTask1 extends SyncTask {

	public TestTask1(Job job) {
		super(job, 0);
	}

	@Override
	public void run() {
		int sum = 0;
		Random rand = new Random();
		for (int i = 0; i < 10000; i++) {
			sum += rand.nextDouble() * 100 - 50;
		}
		
		if (sum > 0)
			sum = 1;
		else if (sum < 0)
			sum = -1;
		else
			sum = 0;
	}
}
